" 简单列表迭代示例
let numbers = [1, 2, 3, 4, 5]
" echo Numbers in list:
for num in numbers
    echo num
endfor

" 字符串列表迭代示例
let words = ['hello', 'world', 'viml']
" echo Words in list:
for word in words
    echo word
endfor

" 空列表迭代示例
let empty_list = []
" echo Before empty list iteration
for item in empty_list
    echo This should not be printed
endfor
" echo After empty list iteration

" 嵌套循环示例
let outer = [1, 2]
let inner = ['a', 'b']
" echo Nested loop example:
for i in outer
    for j in inner
        echo 'Outer:' i 'Inner:' j
    endfor
endfor

" 字典迭代示例
let person = {'name': 'John', 'age': 30, 'city': 'New York'}
" echo Dictionary keys:
for key in person
    echo key
endfor

" 空字典迭代示例
let empty_dict = {}
" echo Before empty dict iteration
for key in empty_dict
    echo This should not be printed
endfor
" echo After empty dict iteration